import { createApp } from 'vue'
import Modal from './Modal.vue'
import { IModalParams } from '@/types'
const modalCreate = ({ title, content }: IModalParams) => {
  const modalApp = createApp(Modal, {
    title,
    content,
    isShow: true
  })
  const mountNode = document.createElement('div')
  document.body.appendChild(mountNode)
  modalApp.mount(mountNode)
}

export default modalCreate
